package com.zte.claa.inficombo.csa.app.service.photo.bean;

import java.sql.Timestamp;
import java.util.Arrays;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/*
 * Author by 0283000106 
 */
public class CameraPhotoData {
	public static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
	public static final String TIME_ZONE = "GMT+8";
	// 摄像头传感器标识
    private String deveui;
	// 图片标识
    private String photoid;
    // 项目ID
    private String projectid;
    
    // 图片生成时间
	@JsonFormat(pattern=DATETIME_FORMAT, timezone = TIME_ZONE)
    private Date collecttime;
	
	// 照片 Mediumblob
	private byte[] photo; 
	// 图片类型 1：JPEG：其他：RFU
	private int phototype; 
	    
    public CameraPhotoData(){
    	this.collecttime = new Timestamp(System.currentTimeMillis()); 
    }

	public String getDeveui() {
		return deveui;
	}

	public void setDeveui(String deveui) {
		this.deveui = deveui;
	}

	public String getPhotoid() {
		return photoid;
	}

	public void setPhotoid(String photoid) {
		this.photoid = photoid;
	}

	public String getProjectid() {
		return projectid;
	}

	public void setProjectid(String projectid) {
		this.projectid = projectid;
	}

	public Date getCollecttime() {
		return collecttime;
	}

	public void setCollecttime(Date collecttime) {
		this.collecttime = collecttime;
	}

	public byte[] getPhoto() {
		return photo;
	}

	public void setPhoto(byte[] photo) {
		this.photo = photo;
	}

	public int getPhototype() {
		return phototype;
	}

	public void setPhototype(int phototype) {
		this.phototype = phototype;
	}

	@Override
	public String toString() {
		return "CameraPhotoData [deveui=" + deveui + ", photoid=" + photoid + ", projectid=" + projectid
				+ ", collecttime=" + collecttime + ", photo=" + Arrays.toString(photo) + ", phototype=" + phototype
				+ "]";
	}  
    
}
